#ifndef CALIBRATION_BUSINESSLOGIC_STANDARDCALIBRATION_H
#define CALIBRATION_BUSINESSLOGIC_STANDARDCALIBRATION_H

#include <QObject>
#include "Interface/Count.h"
#include "Calibration/Model/StandardCalibViewModel.h"

#define STANDARD_CALIBRATE_COUNT 12

class StandardCalibration : public Count
{
    Q_OBJECT
public:
    explicit StandardCalibration(QObject *parent = 0);
    void doInit();
    void doUnInit();
    void viewDataInit();
    void setData(QVariant data);
    void setCountResult(const CountResultDao &countResult);
    bool paramCheck();

    //校准完成
    bool calibrationCompeleted();
    //校正结果有效性
    bool calibrationValid();
    //保存校正结果
    void calibrateResultSave();
    //清除中间数据
    void calibrateInit();
    //计算
    void calculate();
    
public slots:



private:
    StandardCalibViewModel  mStandardCalibViewModel;
    StandardCalibViewModel::StandardCalibParamValue calibBuffer[STANDARD_CALIBRATE_COUNT];
    int calibrateCount;
    bool calibrateCompelete;
    bool calibrateValid;
    
};

#endif // CALIBRATION_BUSINESSLOGIC_STANDARDCALIBRATION_H
